import java.util.ArrayList;
import java.awt.event.*;

abstract class Weapon extends Entity
{
	protected double accuracy;
	protected double maxSpread;
	protected double fireSpeed;
	protected double fireTimer;
	
	public abstract void fire(ArrayList<Entity> ents, double x, double y, double angle);
	public double getAccuracy(){return accuracy;}
	public double getMaxSpread(){return maxSpread;}
	public void modifySpeed(double per){fireSpeed *= per;}
	public void modifySpread(double per){maxSpread *= per;}
	
	class WeaponControl implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			if(fireTimer > 0)
				fireTimer -= .1;
			
			accuracy = Math.max(0,accuracy-.0001);
		}
	}
}